package day6;

public class Teacher extends Person{
	private double salary;
	
	public Teacher() {
		super();// new Person();
	}
	
	public Teacher(int id, String name, int age, double salary) {
		// this.id = id;
		// this.name = name;
		super(id, name, age);// new Person(id, name, age);
		this.salary = salary;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	@Override
	public String toString() {
		return "Teacher [salary=" + salary + ", id=" + id + ", name=" + name + ", age=" + age + "]";
	}

	
	
}